The present invention relates to file systems, and more particularly, this invention relates to dynamic symbolic links which may be used in file systems.
In a file system, symbolic links (also known as “symlinks”) are a special type of file used to create references to other file(s) and/or directory(ies) which are physically or logically stored in the storage system. These file(s) and/or directory(ies) are called the target of the symbolic link. When a symbolic link is opened by an application, the file system automatically redirects the operation to its target, unless the application's open system call states that symbolic links are not to be followed. One particular characteristic of symbolic links is that their targets do not need to exist, as it is possible to create symbolic links to non-existing file(s), non-existing directory(ies), and/or to remove the target once the symbolic link has been created. Symbolic links whose target do not exist are referred to as broken links.
The target of a symbolic link may be specified either as a relative path (e.g., linkname→ ../../filename) or as an absolute path (e.g., linkname→/home/user/filename). Therefore, a symbolic link pointing to its target using one or more relative paths may break if a directory component of its path is renamed, moved, etc. The same applies if the symbolic link (the file) is moved to another location within the file system hierarchy, thereby resulting in the path to no longer accurately refer to the location of its target. Additionally, targets represented by absolute paths are guaranteed to remain valid under such operations, as long as the target is not removed and/or the file system where the target is located is not un-mounted and/or re-mounted at a different mount point.
Accordingly, it would be beneficial to have an absolute-path symbolic link which does not break under the above described conditions.